package com.jmd.ui.tab.a_mapview.panel.left_tool_panel;

import javax.swing.JPanel;

import com.jmd.ui.tab.a_mapview.panel.left_tool_panel.sub.LayerControlButtonPanel;
import com.jmd.ui.tab.a_mapview.panel.left_tool_panel.sub.DrawTypePanel;
import com.jmd.ui.tab.a_mapview.panel.left_tool_panel.sub.LayerSelectorPanel;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.awt.*;
import java.io.Serial;

@Component
public class LeftToolPanel extends JPanel {

    @Serial
    private static final long serialVersionUID = -5741592190558141036L;

    @Autowired
    private DrawTypePanel drawTypePanel;
    @Autowired
    private LayerSelectorPanel layerSelectorPanel;
    @Autowired
    private LayerControlButtonPanel addLayerButton;

    @PostConstruct
    private void init() {

        this.setLayout(new BorderLayout(0, 0));

        this.add(drawTypePanel, BorderLayout.NORTH);
        this.add(layerSelectorPanel, BorderLayout.CENTER);
        this.add(addLayerButton, BorderLayout.SOUTH);

    }
}
